1. Field of the Invention
The present invention relates to layer 2 and layer 3 switching of data packets in a non-blocking network switch configured for switching data packets between subnetworks.
2. Background Art
Local area networks use a network cable or other media to link stations on the network. Each local area network architecture uses a media access control (MAC) enabling network interface devices at each network node to access the network medium.
The Ethernet protocol IEEE 802.3 has evolved to specify a half-duplex media access mechanism and a full-duplex media access mechanism for transmission of data packets. The full-duplex media access mechanism provides a two-way, point-to-point communication link between two network elements, for example between a network node and a switched hub.
Switched local area networks are encountering increasing demands for higher speed connectivity, more flexible switching performance, and the ability to accommodate more complex network architectures. For example, commonly-assigned U.S. Pat. No. 5,953,335 discloses a network switch configured for switching layer 2 type Ethernet (IEEE 802.3) data packets between different network nodes; a received data packet may include a VLAN (virtual LAN) tagged frame according to IEEE 802.1 q protocol that specifies another subnetwork (via a router) or a prescribed group of stations. Since the switching occurs at the layer 2 level, a router is typically necessary to transfer the data packet between subnetworks.
Efforts to enhance the switching performance of a network switch to include layer 3 (e.g., Internet protocol) processing may suffer serious drawbacks, as current layer 2 switches preferably are configured for operating in a non-blocking mode, where data packets can be output from the switch at the same rate that the data packets are received. Newer designs are needed to ensure that higher speed switches can provide both layer 2 switching and layer 3 switching capabilities for faster speed networks such as 100 Mbps or gigabit networks.
However, such design requirements risk loss of the non-blocking features of the network switch, as it becomes increasingly difficult for the switching fabric of a network switch to be able to perform layer 3 processing at the wire rates (i.e., the network data rate).
There is a need for an arrangement that enables a network switch to provide layer 2 switching and layer 3 switching capabilities for 100 Mbps and gigabit links without blocking of the data packets.
There is also a need for an arrangement that enables a network switch to provide layer 2 switching and layer 3 switching capabilities with minimal buffering within the network switch that may otherwise affect latency of switched data packets.
There is also a need for an arrangement that enables a network switch to be easily programmable to distinguish between different types of layer 3 data packets so that quality of service (QoS) can be achieved.
There is also a need for an arrangement to enable a network switch port to instantaneously evaluate an incoming data packet and determine a layer 3 or higher protocol, to provide the associated switch fabric with sufficient time to process the incoming data packet according to the detected protocol.
These and other needs are attained by the present invention, where a network switch port includes a filter configured for evaluating an incoming data packet on an instantaneous basis. The filter performs simultaneous comparisons between the incoming data stream of the data packet and multiple templates configured for identifying respective protocols. Each template is composed of a plurality of min terms, where each min term specifies a prescribed comparison operation with a selected data byte of the incoming data packet. The filter accesses the min terms based on the ordering of the data bytes, such that the min terms that are used to compare the first data byte are first accessed for comparison with the first data byte as the first data byte is received; the min terms used to compare the second data byte are then accessed for comparison with the second data byte as the second data byte is received. Hence, the filter simultaneously compares the min terms that correspond to the selected byte of the incoming data packet as the selected byte is received by the network switch port. The results of the comparisons between the min terms and the selected data bytes of the incoming data stream are evaluated by an equation core within the filter, which determines comparison results for the templates and outputs a tag to the switching core, providing the switching core with information on how to process the received data packet. Hence, the switching core has sufficient time to perform layer 2 or layer 3 switching of the received data packet in a non-blocking manner in a high-speed data network.
One aspect of the present invention provides a method of evaluating an incoming data packet at a network switch port. The method includes storing a plurality of templates configured for identifying respective data formats, each template having at least one min term configured for comparing a corresponding prescribed value to a corresponding selected byte of the incoming data packet. The method also includes simultaneously comparing, to the selected byte, the min terms that correspond to the selected byte as the selected byte is received by the network switch port, and generating a comparison result that identifies the incoming data packet, based on the comparisons of the min terms to the data bytes received by the network switch port. The storage of templates configured for identifying respective data formats enables the network switch port to be easily programmable to identify user-defined data formats. Moreover, the simultaneous comparisons of min terms that correspond to a selected byte as the selected byte is received from the network switch port ensures that the incoming data packet can be evaluated in real time, enabling identification of the incoming data packet relative to the user-defined data formats as the data packet is received.
Another aspect of the present invention provides a method of evaluating an incoming data packet at a network switch port. The method includes simultaneously comparing a first byte of the incoming data packet as the first byte is received by the network switch port, with a plurality of templates by comparing the first byte with at least a first min term associated with at least one of the templates, each template configured for identifying a prescribed format within the incoming data packet. The method also includes simultaneously comparing a second byte of the incoming data packet, following the first byte, with the templates by comparing the second byte with at least a second min term associated with at least one of the templates, and generating a comparison result based on min term results from the comparisons of the first byte and the second byte relative to the plurality of templates. The simultaneous comparison of the first byte with at least the first min term, and the simultaneous comparison of the second byte following the first byte with at least the second min term, ensures that the min terms are sequentially processed based on the order in which the relevant data byte is received. Hence, multiple templates may be processed simultaneously and in real time, by ordering the min terms based on the incoming data stream. Consequently, an incoming data packet may be evaluated at the network switch port in real time, minimizing latency in the network switch port.
Still another aspect of the present invention provides a network switch port filter configured for evaluating an incoming data packet. The network switch port filter includes a min term memory configured for storing min term values. Each min term value is stored in the min term memory based on a corresponding selected byte of the incoming data packet for comparison. The min term value also has an expression portion specifying a corresponding comparison operation, and a template identifier field that specifies templates that use the corresponding min term. The network switch port filter also includes a min term generator configured for simultaneously comparing a received byte of the incoming data packet with the min terms that correspond to the received byte and generating respective min term comparison results, and an equation core configured for generating a frame tag identifying the incoming data packet based on the min term comparison results relative to the templates. Since each min term value is stored in a location based on the corresponding selected byte of the incoming data packet, each min term can be accessed from the min term memory, and compared with the selected byte, based on the order in which the selected byte is received by the network switch port. Hence, the min term generator can simultaneously compare a given received byte of the incoming data packet with all the relevant min terms, enabling real-time evaluation of the incoming data packet.
Additional advantages and novel features of the invention will be set forth in part in the description which follows and in part will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The advantages of the present invention may be realized and attained by means of instrumentalities and combinations particularly pointed in the appended claims.